﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XuanXiang.Infrastructure.Dto.Response;

namespace XuanXiang.Service.Instance
{
    public class Base_Service
    {
        public Api_Result_Dto Get_Result(int code,string? message="",object? data=null) { 
        Api_Result_Dto dto = new Api_Result_Dto() { 
        data=data
        };
            dto.code = code >= 0 ? Api_Code.ok : Api_Code.fail;
            dto.message = string.IsNullOrEmpty(message) ? (code >= 0 ? "操作成功" : "操作失败") : message;
            return dto;
        }
    }
}
